package FileIOStream;

import java.io.File;
import java.io.IOException;

/**
 * @Author liangzai
 * @Description:
 */
public class Demo5 {
    public static void main(String[] args) throws IOException, InterruptedException {
        File file = new File("./test1");
        file.createNewFile();
        Thread.sleep(5000);
        File newfile = new File("./src/test2");
        newfile.createNewFile();
        boolean results = file.renameTo(newfile);
        System.out.println(results);
    }
}







